import axios from "axios";
const getRepoTags = async (token: string, owner: string, repo: string) => {
  const response = await axios.get(
    `https://gitee.com/api/v5/repos/${owner}/${repo}/tags`,
    {
      params: {
        access_token: token,
      },
    }
  );
  return response.data;
};
export default defineEventHandler(async (event) => {
  const runtimeConfig = useRuntimeConfig();
  return await getRepoTags(
    runtimeConfig.giteeToken,
    runtimeConfig.giteeAuthorName,
    "cirno-chat-mobile-frontend"
  );
});
